1. Field of the Invention
The present invention relates to a conversion table compression method used for color conversion of an image and the like. More specifically, the present invention relates to a conversion table used to process image data by a color image processing apparatus, especially, a method of reducing a storage capacity necessary to store a color conversion table, and an image processing apparatus which converts a conversion table into data suitable for storage or processes an image using a stored conversion table.
2. Description of the Related Art
Apparatuses such as a color printer, color copying machine, and color scanner which input/output a color image need to perform color conversion processing highly optimized on the basis of human perception and the like in order to provide a high-quality color image. It is difficult to achieve color conversion processing by simple calculation, so conversion processing is done using a lookup table (to be referred to as an LUT hereinafter) capable of implementing conversion processing with a high degree of freedom. The LUT is a kind of conversion table, and holds an output value corresponding to an input in the table. The LUT requires a large storage capacity to hold output data corresponding to all conceivable inputs. In general, the LUT holds output data (called the values of grid points) corresponding to discrete specific inputs (called grid points), and output data to an input other than grid points is calculated by interpolation using the values of the grid points.
For example, the most popular color conversion processing for input data of 8 bits (0 to 255) for each of R (Red), G (Green), and B (Blue) and output data of 8 bits for each of C (Cyan), M (Magenta), Y (Yellow), and K (blacK) will be examined. The LUT used for this conversion is a three-dimensional table whose coordinate axes are R, G, and B, and contains Y, M, C, and K values as elements in correspondence with R, G, and B values. In this case, input data (R, G, and B) may take about 1,6700,000 values from 0h to FFFFFFh. The LUT used for this color conversion must store about 1,6700,000×4 bytes=about 64-Mbyte data.
To reduce the data amount, grid points are set at specific inputs, e.g., R, G, and B values “0, 64, 128, 191, and 255”. The LUT saves Y, M, C, and K values corresponding to these grid points as the values of the grid points. For example, input data serving as grid points are (0,0,0), (128,191,64), (64,255,128), and the like. The LUT holds output data as grid point values corresponding to these grid points. When the LUT holds output data corresponding to given input data, a position specified by the input data in the LUT is called a grid point. The value of output data held in the LUT in correspondence with the input data is called the value of a grid point. Output data corresponding to input data such as (128,200,64) other than grid points is generally calculated from the weighted average of grid point values in accordance with distances from grid points. Calculating output data from the weighted average of grid point values is called interpolation. Various interpolation methods are proposed (see patent reference 4 and the like).
The number of grid points represents that of grid points along each coordinate axis (also simply called an axis) of the LUT. In the above example, the number of grid points is 5 along each axis. The values of input data corresponding to grid points along each axis are called the positions of grid points. In the above example, the positions of grid points are 0, 64, 128, 191, and 255. Numbers assigned to the positions of grid points in the ascending order are called grid point numbers. In the above example, the grid point number of grid point position 0 is 0, and that of grid point position 191 is 3. The number of grid points and their positions are equal between the axes in the above example, but may be different between them. To calculate output data corresponding to input data other than grid points by interpolation, the LUT must hold at least grid points corresponding to the minimum and maximum values of input data, so the minimum number of grid points is 2.
Recently, image processing apparatuses such as an inkjet printer achieve higher image qualities than that of a silver halide photograph, and need to support a larger number of paper types for a broader application purpose. To provide higher image qualities, image processing apparatuses need to perform high-precision color conversion processing. To support many paper types, a color conversion table optimal for each paper type is necessary. The number of color conversion tables used in one image processing apparatus further increases. When executing color conversion processing at high precision using interpolation together with a color conversion table, one effective method is to increase the number of grid points in the color conversion table and decrease the distance between each grid point and input data used in interpolation. However, as the number of grid points increases (i.e., the table becomes larger), the data amount of one LUT greatly increases. These factors increase the data amount of the color conversion table more and more, wasting resources such as a memory used to store the data.
Data compression is known as a technique of making a relatively large amount of data fall within a limited resource. However, a direct application of known data compression to compression of a color conversion table cannot satisfactorily reduce the data amount, i.e., cannot increase the compression ratio. General lossless compression processing reduces the data amount using frequent reappearance of the same data. The compression ratio is high for data which appears at high frequency, but is low for data which appears at low frequency. The color conversion table is expressed as a set of values which change smoothly but nonlinearly due to color continuity. Although the value of the color conversion table changes smoothly along with change of the input, the change is not regular and values are distributed in a wide range without any deviation. It is, therefore, difficult to increase the compression ratio of the color conversion table. Lossy compression processing loses data, is not proper to increase the image quality, and is not preferably used to compress the color conversion table.
For this reason, no high compression ratio can be attained even by applying various known compression algorithms. To solve this problem, there are proposed several methods of increasing the compression ratio of the color conversion table by converting a color conversion table before compression processing (see patent references 1 to 3 and the like). As the compression method, U.S. Pat. No. 4,558,302 discloses an LZW compression method.
[Patent Reference 1] Japanese Patent Laid-Open No. 11-017971
[Patent Reference 2] Japanese Patent Laid-Open No. 2002-209114
[Patent Reference 3] Japanese Patent Laid-Open No. 2003-110869
[Patent Reference 4] Japanese Patent Laid-Open No. 53-123201
However, several faults have been pointed out in the proposed methods of converting a color conversion table before compression. For example, (1) an increase in compression ratio is not sufficient. (2) No method is applicable unless the color conversion table satisfies predetermined conditions. (3) Since each color conversion table is individually processed, the compression ratio of each color conversion table does not change even upon an increase in the number of color conversion tables, and the total data amount of compressed color conversion tables also increases at the same rate as the increase in the number of color conversion tables.
Demand arises for a more efficient, general-purpose compression method in order to solve these faults and reduce the capacity of the conversion table.